package bz.yfw.example.s3blazeds.part2.main.view
{
	import org.seasar.akabana.yui.framework.ns.viewlogic;
	
	import spark.components.Button;
	import spark.components.View;
	
	use namespace viewlogic;
	
	public class MainView extends View
	{
		public var btnSearch:Button;
		public var btnEntry:Button;
		public var btnExit:Button;
		
		private var requiredCurrentState:String;
		
		public function MainView()
		{
			super();
			addNavigationContent();
			addActionContents();
		}
		
		viewlogic function addNavigationContent():void {
			btnSearch = new Button();
			btnSearch.label = "社員検索";
			
			btnEntry = new Button();
			btnEntry.label = "社員登録";
			
			navigationContent = [btnSearch, btnEntry];
		}
	
		viewlogic function addActionContents():void {
			btnExit = new Button();
			btnExit.label = "終了";
			
			actionContent = [btnExit];
		}
		
		protected override function getCurrentSkinState():String{
			if (requiredCurrentState == null) {
				return "normal";
			}
			return requiredCurrentState;
		}
	}
}